import { defHttp } from '/@/common/util/axios';

enum Api {
  list = '/emp/hubTeamXsSet/getPage',
  save='/emp/hubTeamXsSet/add',
  edit='/emp/hubTeamXsSet/edit',
  deleteOne = '/emp/hubTeamXsSet/delete',
  updateBatch = '/emp/hubTeamXsSet/updateBatch',
  deleteBatch = '/emp/hubTeamXsSet/deleteBatch',
  importExcel = '/emp/hubTeamXsSet/importExcel',
  exportXls = '/emp/hubTeamXsSet/exportXls',
}

/**
 * 导出导入api
 * @param params
 */
export const getExportUrl = Api.exportXls;
export const getImportUrl = Api.importExcel;
/**
 * 增删改查接口
 */
export const list = (params) => defHttp.get({ url: Api.list, params });
export const saveOrUpdate = (params, isUpdate) => defHttp.post({ url: isUpdate ? Api.edit : Api.save, params });
export const deleteOne = (params) => defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true });
export const updateBatch = (params) => defHttp.post({ url: Api.updateBatch, params });
export const deleteBatch = (params) => defHttp.delete({ url: Api.deleteBatch, params }, { joinParamsToUrl: true });

